package com.sky.mapper;

import com.sky.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

@Mapper
public interface UserMapper {
    @Select("select * from user where openid= #{openid}")
    User wxLogIn(String openid);

    //因为要返回主键值，所以这里用xml配置
    void addUser(User user);

    //根据主键值id查询用户
    @Select("select * from user where id=#{id}")
    User getById(Long userId);
}
